package b1.conifg
{
	public class ObstacleConfig
	{
		//障碍物的名字
		public var name:String;
		//障碍物的类型
		public var obstacleIndex:int;
		//碰撞点
		public var hitPoints:Array;
		//密度
		public var density:Number;
		//弹性
		public var restitution:Number;
			
		public function ObstacleConfig(obstacleXML:XML)
		{
			obstacleIndex = parseInt(obstacleXML.index);
			name = obstacleXML.name;
			restitution = parseFloat(obstacleXML.restitution);
			density = parseFloat(obstacleXML.density);
			hitPoints = new Array();
			for (var i:int = 0; i < obstacleXML.hitPoint.length(); i++)
			{
				var hitPoint:HotPoint = new HotPoint(obstacleXML.hitPoint[i]);
				hitPoints.push(hitPoint);
			}
		}

	}
}